package com.zg.scf.enm;

import com.zg.common.core.enm.BaseEnumerator;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 企业相关枚举
 */
public class CompanyInfoConstants {

    /**
     * 企业类型
     */
    @Getter
    @AllArgsConstructor
    public enum CompanyTypeEnum implements BaseEnumerator {

        NORMAL("1", "融资企业"),
        FINANCE("2", "金融机构");
        private final String value;
        private final String label;

        public static String getByValue(String value) {
            for (CompanyTypeEnum type : CompanyTypeEnum.values()) {
                if (type.getValue().equals(value)) {
                    return type.getLabel();
                }
            }
            return "";
        }
    }

    /**
     * 企业关联人
     */
    @Getter
    @AllArgsConstructor
    public enum CompanyPersonTypeEnum implements BaseEnumerator {

        AGENT("1", "代理人"),
        CONTACT("2", "联系人");
        private final String value;
        private final String label;

        public static String getByValue(String value) {
            for (CompanyPersonTypeEnum type : CompanyPersonTypeEnum.values()) {
                if (type.getValue().equals(value)) {
                    return type.getLabel();
                }
            }
            return "";
        }
    }

    /**
     * 企业认证状态
     */
    @Getter
    @AllArgsConstructor
    public enum AuthStatusEnum implements BaseEnumerator{
        NOT_STATUS("0", "未认证"),
        ING_STATUS("1", "认证中"),
        YES_STATUS("2", "已认证"),
        ;
        private final String value;
        private final String label;

        public static String getByValue(String value) {
            for (AuthStatusEnum type : AuthStatusEnum.values()) {
                if (type.getValue().equals(value)) {
                    return type.getLabel();
                }
            }
            return "";
        }
    }

    /**
     * 客户类型
     */
    @Getter
    @AllArgsConstructor
    public enum CustomerTypeEnum implements BaseEnumerator{
        COAL("0", "焦煤用户"),
        LOGISTICS("1", "物流用户"),
        SYSTEM("2", "系统用户"),
        ;
        private final String value;
        private final String label;

        public static String getByValue(String value) {
            for (CustomerTypeEnum type : CustomerTypeEnum.values()) {
                if (type.getValue().equals(value)) {
                    return type.getLabel();
                }
            }
            return "";
        }
    }

    /**
     * 审核状态
     */
    @Getter
    @AllArgsConstructor
    public enum AuditStatusEnum implements BaseEnumerator{
        STATUS0("0", "待认证"),
        STATUS1("1", "认证待审核"),
        STATUS2("2", "认证通过"),
        STATUS3("3", "认证驳回"),
        STATUS4("4", "变更待审核"),
        STATUS5("5", "变更驳回"),
        STATUS6("6", "变更通过"),
        ;
        private final String value;
        private final String label;

        public static String getByValue(String value) {
            for (AuditStatusEnum type : AuditStatusEnum.values()) {
                if (type.getValue().equals(value)) {
                    return type.getLabel();
                }
            }
            return "";
        }
    }
    /**
     * 是否来自企查查
     */
    @Getter
    @AllArgsConstructor
    public enum IsQccEnum implements BaseEnumerator{
        NO("0", "否"),
        YES("1", "是"),

        ;
        private final String value;
        private final String label;

        public static String getByValue(String value) {
            for (IsQccEnum type : IsQccEnum.values()) {
                if (type.getValue().equals(value)) {
                    return type.getLabel();
                }
            }
            return "";
        }
    }
    /**
     * 企业状态
     */
    @Getter
    @AllArgsConstructor
    public enum StatusEnum implements BaseEnumerator{
        ENABLE("0", "启用"),
        DISABLE("1", "停用"),
        ;
        private final String value;
        private final String label;

        public static String getByValue(String value) {
            for (StatusEnum type : StatusEnum.values()) {
                if (type.getValue().equals(value)) {
                    return type.getLabel();
                }
            }
            return "";
        }
    }
}
